package com.heima.threadGroup;

/**
 * @Author: Ethan Yankang
 * @Program: 面试必会代码
 * @Date: 2024-09-07 09:25
 **/
/*
 * @description 演示根线程组
 */
public class Demo3 {
    public static void main(String[] args) {
        System.out.println(Thread.currentThread());
        System.out.println(Thread.currentThread().getThreadGroup());
        System.out.println(Thread.currentThread().getThreadGroup().getParent());
        System.out.println(Thread.currentThread().getThreadGroup().getParent().getParent());
    }
}
/*
Thread[#1,main,5,main]
java.lang.ThreadGroup[name=main,maxpri=10]
java.lang.ThreadGroup[name=system,maxpri=10]
null
 */